package service;

import bean.Student;
import dao.StudentDao;
import factory.DaoFactory;

public class StudentService {

    //自定义成员变量
    private StudentDao studentDao;

    /**
     * 自定义构造方法实现成员变量的初始化
     */
    public StudentService(){
        this.studentDao = DaoFactory.getStudentDao();
    }

    /**
     * //自定义成员方法实现根据参数指定的Student对象调用Dao层实现功能
     * @param student
     * @return
     */
    public Student studentAddService(Student student){
        return studentDao.StudentAdd(student);
    }
    public Student studentDeleteService(Student student){
        return studentDao.StudentDelete(student);
    }
    public Student studentQueryService(Student student){
        return studentDao.StudentQuery(student);
    }
}
